package thinkingJava.chapter18;

import static util.Print.*;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.List;
public class RecoverCADState {

	public static void main(String[] args) throws FileNotFoundException, IOException, ClassNotFoundException {
		ObjectInputStream in = new ObjectInputStream(
				new FileInputStream("CADState.out"));
		List<Class<? extends Shape>> shapeTypes = (List<Class<? extends Shape>>) in.readObject();
		print(shapeTypes);
		print("----------------------------------------->");
		Line.deserializeStaticState(in);
		List<Shape> shapes =(List<Shape>) in.readObject();
		print(shapes);
	}
}
